"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = Example1;

var _index = _interopRequireDefault(require("../../index"));

var _react = _interopRequireDefault(require("react"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function Example1() {
  var _React$useState = _react.default.useState("<p><strong>123</strong> sdfsdfdsfdsfdsf<br />\n  <strong>123</strong> 1231232131<br />\n  </p>\n  <p><strong>234</strong> 12321312312<br />\n  <strong>334</strong> 123jkjkjk</p>\n  <iframe height=498 width=510 src='https://player.youku.com/embed/XNTEzMTkzMzE4NA==' frameborder=0 'allowfullscreen'></iframe>\n  <iframe src=\"https://open.iqiyi.com/developer/player_js/coopPlayerIndex.html?vid=88367efff75097ceced4cae95e96efa4&tvId=5711922189950400&accessToken=2.ef9c39d6c7f1d5b44768e38e5243157d&appKey=8c634248790d4343bcae1f66129c1010&appId=1368&height=100%&width=100%\" frameborder=\"0\" allowfullscreen=\"true\" width=\"100%\" height=\"100%\"></iframe>\n  <iframe frameborder=\"0\" src=\"https://v.qq.com/txp/iframe/player.html?vid=k0040t2frxp\" allowFullScreen=\"true\"></iframe>\n  <iframe src=\"//player.bilibili.com/player.html?aid=716973971&bvid=BV1nQ4y1f7Pr&cid=376697471&page=1\" scrolling=\"no\" border=\"0\" frameborder=\"no\" framespacing=\"0\" allowfullscreen=\"true\"> </iframe>\n  <iframe frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" width=330 height=86 src=\"//music.163.com/outchain/player?type=2&id=1831482748&auto=1&height=66\"></iframe>\n  <iframe height=498 width=510 src='https://player.youku.com/embed/XNTE4MjIyNTc4OA==' frameborder=0 'allowfullscreen'></iframe>\n  "),
      _React$useState2 = _slicedToArray(_React$useState, 2),
      html = _React$useState2[0],
      setHTML = _React$useState2[1];

  return /*#__PURE__*/_react.default.createElement(_index.default, {
    onParse: function onParse(nodeTree, imgUrls) {
      console.log(nodeTree, imgUrls);
    },
    onClick: function onClick(e, node) {
      console.log(e, node);
    },
    onImgClick: function onImgClick(node) {
      console.log('img click', node);
    },
    onLinkClick: function onLinkClick(node) {
      console.log('link click', node);
    },
    iframeWhiteList: ['bilibili', '163', 'iqiyi', 'qq', 'youku'],
    content: html
  });
}